package com.example.yydm666.controller;

import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@Api(tags = "重定向路径模块")
public class RedirectHandler {
    //    加上后swagger-ui不可以访问
    @RequestMapping("/{url}")
    public String redirect(@PathVariable("url") String url) {
        return url;
    }

    @RequestMapping("/")
    public String index() {
        return "redirect:/productCategory/main";
    }

}
